<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilskey: xilskey common file</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilskey
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__xilskey__cmn__crc.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xilskey common file</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaf973666d5d2787e571a17f6c12d6cd29"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__cmn__crc.html#gaf973666d5d2787e571a17f6c12d6cd29">XilSKey_CrcCalculation</a> (const u8 *Key)</td></tr>
<tr class="memdesc:gaf973666d5d2787e571a17f6c12d6cd29"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function Calculates CRC value based on hexadecimal string passed.  <a href="#gaf973666d5d2787e571a17f6c12d6cd29">More...</a><br/></td></tr>
<tr class="separator:gaf973666d5d2787e571a17f6c12d6cd29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0552daa4e1f376eaac1360aba6d23930"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__cmn__crc.html#ga0552daa4e1f376eaac1360aba6d23930">XilSkey_CrcCalculation_AesKey</a> (const u8 *Key)</td></tr>
<tr class="memdesc:ga0552daa4e1f376eaac1360aba6d23930"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates CRC value of the provided key.  <a href="#ga0552daa4e1f376eaac1360aba6d23930">More...</a><br/></td></tr>
<tr class="separator:ga0552daa4e1f376eaac1360aba6d23930"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaf973666d5d2787e571a17f6c12d6cd29"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_CrcCalculation </td>
          <td>(</td>
          <td class="paramtype">const u8 *&#160;</td>
          <td class="paramname"><em>Key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function Calculates CRC value based on hexadecimal string passed. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Key</td><td>Pointer to the string contains AES key in hexadecimal of length less than or equal to 64.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>On Success returns the Crc of AES key value.</li>
<li>On failure returns the error code when string length is greater than 64</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>If the length of the string provided is less than 64, this function appends the string with zeros. For calculation of AES key's CRC one can use u32 XilSKey_CrcCalculation(u8 *Key) API or reverse polynomial 0x82F63B78. </dd></dl>

<p>References <a class="el" href="xilskey__utils_8c.html#aaeb26ca3e2bcdbf7207734864aa58af1">XilSKey_Efuse_ConvertStringToHexBE()</a>, <a class="el" href="xilskey__bbram_8c.html#a37c270a53d567eed209d11b83d16cca7">XilSKey_RowCrcCalculation()</a>, and <a class="el" href="group__xilskey__plefuse__error__codes.html#gga8fd80cd0c662e8df2920d23077b48d65ae55d28ebd5f89397eda7ba2640fa5e02">XSK_EFUSEPL_ERROR_NOT_VALID_KEY_LENGTH</a>.</p>

</div>
</div>
<a class="anchor" id="ga0552daa4e1f376eaac1360aba6d23930"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSkey_CrcCalculation_AesKey </td>
          <td>(</td>
          <td class="paramtype">const u8 *&#160;</td>
          <td class="paramname"><em>Key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculates CRC value of the provided key. </p>
<p>Key should be provided in hexa buffer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Key</td><td>Pointer to an array of 32 bytes, which holds an AES key.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Crc of provided AES key value. To calculate CRC on the AES key in string format please use XilSKey_CrcCalculation. </dd></dl>

<p>References <a class="el" href="xilskey__bbram_8c.html#a37c270a53d567eed209d11b83d16cca7">XilSKey_RowCrcCalculation()</a>.</p>

<p>Referenced by <a class="el" href="group__xilskey__zynqmp__efuse.html#ga5b46f3a03d5163f08b7782f669a78748">XilSKey_ZynqMp_EfusePs_Write()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
